class AppRisk(object):
    def __init__(self):
        pass

    @staticmethod
    def get_url_with_event(event):
        """
        {"secure": True,"eventData": {"op": "event","log_id": None,"page_sn": None, "page_el_sn": None,"sub_op": "sensor"}}
        {"secure": False,"eventData": {"op": "epv","log_id": None,"page_sn": 10002, "page_el_sn": None,"sub_op": "back"}}
        {"secure": False,"eventData": {"op": "impr","log_id": None,"page_sn": 10002, "page_el_sn": 8084556,"sub_op": None}}
        {"secure": False,"eventData": {"op": "pv","log_id": None,"page_sn": 14038, "page_el_sn": None,"sub_op": None}}
        {"secure": False,"eventData": {"op": "click","log_id": None,"page_sn": 10002, "page_el_sn": 294115,"sub_op": None}}
        {"secure": False,"eventData": {"op": "up_slide","log_id": None,"page_sn": 10002, "page_el_sn": 9285545,"sub_op": None}}
        {"secure": False,"eventData": {"op": "down_slide","log_id": None,"page_sn": 10002, "page_el_sn": 99595,"sub_op": None}}
        """
        if event.get("secure") is True:
            return "https://th.pinduoduo.com/te.gif"
        if not event.get("eventData", {}).get("op"):
            return "https://th.pinduoduo.com/t.gif"
        return "https://th.pinduoduo.com/t.gif"


if __name__ == "__main__":
    params = {
        "source": "index",
        "page_sn": "10002",
        "page_id": "10002_1737527426585_hqmt1o6wxg",
        "op": "impr",
        "rec_goods_id": "688955435953",
        "page_el_sn": "3564456",
        "goods_id": "688955435953",
        "item_idx": "3",
        "store_id": "-323003830031",
        "sku_id": "1691050334261",
        "pfresh": '{"pfid":"dc6bf97a:6b71b354:app_banner:1737527426468"}',
        "_x_cid": "ddmc_app_home",
        "in_new_style_grey": "false",
        "new_style_show_type": "0",
        "time": "1737527426283",
        "log_id": "1737527426283vmiigbqr4ll3c6cy",
        "user_id": "",
        "uin": "",
        "app_id": "",
        "screen_width": "400",
        "screen_height": "700",
        "dpr": "2",
        "app_version": "",
        "platform": "unknown",
        "cookie_fp": "XpmqnpmbX0Tbn5dbXo__Wo38OZviskfTEvUhxc9s",
        "storage_fp": "Xpmqn5gYl09ynqdxlT_6ofP_7NjxwfQsrTrf51~4",
        "dcf": "gaFJkpkhCCcrFhXJWkhvFZzqkvYJ.18.4103883560",
    }
